#include <stdio.h>

int SumToTop(int top)
{
    int sum = 0;
    for (int i = 1; i <= top; ++i)
    {
        printf("sum --> %d\n", sum);
        sum += i;
    }
    return sum;
}
int main()
{
    int top;
    scanf("%d", &top);
    int n = SumToTop(top);

    printf("n = %d\n", n);
    return 0;
}
